home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / server1.zip / _SERVCON.QC < prev    next >
Text File  |  1996-08-30  |  3KB  |  91 lines

  1. /*
  2. **
  3. ** _servcon.qc (ServerConsole Code , 1.1)
  4. **
  5. ** Copyright (C) 1996 Johannes Plass
  6. ** 
  7. ** This program is free software; you can redistribute it and/or modify
  8. ** it under the terms of the GNU General Public License as published by
  9. ** the Free Software Foundation; either version 2 of the License, or
  10. ** (at your option) any later version.
  11. ** 
  12. ** This program is distributed in the hope that it will be useful,
  13. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. ** GNU General Public License for more details.
  16. **
  17. ** You should have received a copy of the GNU General Public License
  18. ** along with this program; if not, write to the Free Software
  19. ** Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. ** 
  21. ** Author:   Johannes Plass (plass@dipmza.physik.uni-mainz.de)
  22. **
  23. */
  24.  
  25. void(entity player) ServerConsoleInit =
  26. {
  27.    if (!USE_MODULE_SERVERCONSOLE) return;
  28.    // nothing to be done here.
  29. };
  30.  
  31. void(entity player) ServerConsoleInfo =
  32. {
  33.    if (!USE_MODULE_SERVERCONSOLE) return;
  34.    // nothing to be done here.
  35. };
  36.  
  37. void(entity player) ServerConsolePlayerEntered =
  38. {
  39.    if (!USE_MODULE_SERVERCONSOLE) return;
  40.    dprint (self.netname);
  41.    dprint (" entered the game\n");
  42. };
  43.  
  44. void(entity targ, entity attacker) ServerConsoleClientObituary =
  45. {
  46.    //dprint ("ServerConsoleClientObituary: executing\n");
  47.  
  48.    if (!USE_MODULE_SERVERCONSOLE) return;
  49.  
  50.    if (targ.classname == "player") {
  51.       if (attacker.classname == "teledeath") {
  52.          // telefragging
  53.          dprint(targ.netname);
  54.          dprint(" was telefragged by ");
  55.          dprint(attacker.netname);
  56.          dprint("\n");
  57.       } else if (attacker.classname == "teledeath2") {
  58.          // never seen in game, so may be wrong here
  59.          dprint(targ.netname);
  60.          dprint(" had an accident\n");
  61.       } else if (attacker.classname == "player") {
  62.          if (targ == attacker) {
  63.             // player killed by own weapon
  64.             dprint(targ.netname);
  65.             dprint(" had an accident\n");
  66.          }  else {
  67.             // attacker killed target
  68.             dprint(targ.netname);
  69.             dprint(" was killed by ");
  70.             dprint(attacker.netname);
  71.             dprint("\n");
  72.          }
  73.       } else {
  74.          // player killed by environment (slime, water, lava etc.)
  75.          dprint(targ.netname);
  76.          dprint(" had an accident\n");
  77.       }
  78.    }
  79. };
  80.  
  81. void(entity player) ServerConsoleClientSuicide =
  82. {
  83.    //dprint ("ServerConsoleClientSuicide: executing\n");
  84.  
  85.    if (!USE_MODULE_SERVERCONSOLE) return;
  86.  
  87.    dprint(player.netname);
  88.    dprint(" suicides\n");
  89. };
  90.  
  91.